<?php
session_start();
include_once "header.php";
include_once "navbar.php";

$email = $_GET["email"];
$token = $_GET["token"];
$alert = $_GET["alert"];

switch($alert) {
	case 1 :
		$alert = "Tienes que rellenar todos los campos";
		break;
	case 2 :
		$alert = "Las nuevas contraseñas no coinciden";
		break;
	case 3 :
		$alert = "Usuario no registrado";
		break;
	case 4 :
		$alert = "Código incorrecto.";
		break;
		}


?>

<!DOCTYPE html>
  <html>
  <head>
    <title>Huelgas Manifestaciones - Cambio Contraseña</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
    <link href='./bootstrap/css/bootstrap.css' rel='stylesheet' type='text/css' />
    <link href='./bootstrap/css/bootstrap-responsive.css' rel='stylesheet' type='text/css' />
    <link rel='stylesheet' href='./admin/admin.css' type='text/css' />
    <script src='./bootstrap/js/bootstrap.js' type='text/javascript' charset='utf-8'></script>
    <script src='./scripts/jquery-1.9.1.min.js' type='text/javascript' charset='utf-8'></script>
    <script type="text/javascript">

  <? renderGoogleAnalytics() ?>

</script>
  </head>
  <body>
		<div id='content'>	
   
      <form action="cambiopassword.php" class="well form-inline" id="cambiopass" method="post">  
  <h1>
    Cambio de contraseña
  </h1>
   
  <?  
    if($alert != "") {
      echo "
        <div class='alert alert-danger'>
          $alert
        </div>
      ";
    }
  ?>

     <label class="input-label">Tu email</label>
     <input type="text" class="input-large" name="email"  maxlength="100" value="<?echo $email?>"><br><br>
     <label class="input-label">Nueva Contraseña</label>
     <input type="password" name="nuevo_password" class="input-large" size=28 maxlength=255><br><br>
     <label class="input-label">Repite Nueva Contraseña</label>
     <input type="password" name="repite_nuevo_password" class="input-large" size=28 maxlength=255><br><br>
     <input type="hidden" name="token" value="<?echo $token?>">
     <button type="submit" class="btn btn-info">Cambiar Contraseña</button>
     </form>
    </div>
</body>
</html>